UCF STIG Viewer Logo

The audit system must be configured to audit the loading and unloading of dynamic kernel modules.


Overview

Finding ID Version Rule ID IA Controls Severity
RHEL-06-000202 RHEL-06-000202 RHEL-06-000202_rule Low
Description
The addition/removal of kernel modules can be used to alter the behavior of the kernel and potentially introduce malicious code into kernel space. It is important to have an audit trail of modules that have been introduced into the kernel.
STIG Date
Red Hat Enterprise Linux 6 Security Technical Implementation Guide 2013-02-05

Details

Check Text ( C-RHEL-06-000202_chk )
To determine if the system is configured to audit calls to the "init_module" system call, run the following command:

# auditctl -l | grep syscall | grep init_module

If the system is configured to audit this activity, it will return a line. To determine if the system is configured to audit calls to the "delete_module" system call, run the following command:

# auditctl -l | grep syscall | grep delete_module

If the system is configured to audit this activity, it will return a line.
If no line is returned, this is a finding.
Fix Text (F-RHEL-06-000202_fix)
Add the following to "/etc/audit/audit.rules" in order to capture kernel module loading and unloading events, setting ARCH to either b32 or b64 as appropriate for your system:

-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=[ARCH] -S init_module -S delete_module -k modules